9ebf40
@@ -299,6 +299,11 @@
private static RexNode simplifyCase(RexBuilder rexBuilder, RexCall call,
         if (operand.isAlwaysTrue()) {
           // Predicate is always TRUE. Make value the ELSE and quit.
           newOperands.add(operands.get(i + 1));
+          if (unknownAsFalse && RexUtil.isNull(operands.get(i + 1))) {
+            values.add(rexBuilder.makeLiteral(false).toString());
+          } else {
+            values.add(operands.get(i + 1).toString());
+          }
           break;
         } else if (operand.isAlwaysFalse() || RexUtil.isNull(operand)) {
           // Predicate is always FALSE or NULL. Skip predicate and value.
